/*
 *   Clovis
 *   Copyright (C) 2008 SFWOL
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef __POINT_H
#define __POINT_H

#include <iostream>

namespace clovis {

	namespace core {

		/*!
		 * \brief A Point class to use everywhere
		 *
		 * The class define a x and y position, it could be use by other classes.
		 */
		template <class T>
		class Point {

			private:

				T x, y;

			public:

				/*!
				 * Constructor
				 * \code
				 * Point<CInteger> my_coords (10, 5);
				 * \endcode
				 */
				Point(T x, T y){

					this->x = x;
					this->y = y;

				}

				/*!
				 * Set the X position of the Point
				 * \arg x The new X position
				 */
				void setX(T x){

					this->x = x;

				}

				/*!
				 * Set the Y position of the Point
				 * \arg y The new Y position
				 */
				void setY(T y){

					this->y = y;

				}

				/*!
				 * Set the X and Y position of the point
				 * \arg x The new X position
				 * \arg y The new Y position
				 */
				void setXY(T x, T y){

					this->x = x;
					this->y = y;

				}

				/*!
				 * Get the X position of the Point
				 * \return The X position
				 */
				T getX(){

					return this->x;

				}

				/*!
				 * Get the Y position of the Point
				 * \return The Y position
				 */
				T getY(){

					return this->y;

				}

		};

	};

};

#endif
